﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TarreOA.TarreOABLL;
using TarreOA.TarreOAModels;

public partial class Flow_Info_AddFeedBack : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {
        if(Request.Form.Get("WR_ID") != null && Request.Form.Get("ST_SO") != null && Request.Form.Get("AL_AF") != null) {
            int work_id = int.Parse(Request.Form.Get("WR_ID"));
            int st_so = int.Parse(Request.Form.Get("ST_SO"));
            string allow_affix = Request.Form.Get("AL_AF");
            string content = Request.Form.Get("content");
            User curLoginUser = (User) Session["user"];
            Flow_WorkFeedBack_Service fwfb_service = new Flow_WorkFeedBack_Service();
            if(fwfb_service.AddWorkFeedBack(work_id, content, curLoginUser.UserName) == 1) {
                Response.Redirect("AppearFeedBack.aspx?WR_ID=" + work_id + "&ST_SO=" + st_so + "&AL_AF=" + allow_affix);
            }
        }
    }
}
